package com.wenguo.common.util;

import java.util.Properties;

public class PropertiesUtil {

	private static PropertiesUtil readProp;
	private Properties prop;

	private PropertiesUtil() {
		if (null == prop){
			prop = new Properties();
		}
	}

	public static PropertiesUtil getInstance() {
		if (null == readProp) {
			readProp = new PropertiesUtil();
		}
		return readProp;
	}

	public Properties loadProperties(String fileName) {
		try {
			prop.load(PropertiesUtil.class.getResourceAsStream(fileName));
			return prop;
		} catch (Exception e) {
			return null;
		}
	}
}
